package com.shenhaofeng.app.adapter;

/**
 * 检查适配器是否为空
 * Created by Administrator on 2016/8/10.
 */
public class SingleModuleEmptyObservable extends EmptyAdapterDataObservable {


    public SingleModuleEmptyObservable(Callback callback, SingleTypeMoreAdapter adapter) {
        super(callback, adapter);
    }


    @Override
    protected void checkEmpty() {
        SingleTypeMoreAdapter singleTypeMoreAdapter = (SingleTypeMoreAdapter) adapter;
        callback.onEmpty(singleTypeMoreAdapter.getModule().getCount() == 0);
    }
}
